function Get-ScriptDirectory
{
    $Invocation = (Get-Variable MyInvocation -Scope 1).Value
    Split-Path $Invocation.MyCommand.Path
}
$file = (Get-ScriptDirectory | split-path) + "\Setup\MySQLConfig.xml"
$passwordfile = (Get-ScriptDirectory | split-path) + "\Setup\password.txt"
if (Test-Path $passwordfile)
{ }
else
{ return $FALSE}
if (Test-Path $file)
   { 
      $x = [xml](get-content $file)
      trap {
         return $FALSE
      }
      if ($x.MySQLConfig -eq $null)
         { return $FALSE }
      if ($x.MySQLConfig.host -eq $null -or $x.MySQLConfig.host -eq "")
         { return $FALSE }
      if ($x.MySQLConfig.user -eq $null -or $x.MySQLConfig.user -eq "")
         { return $FALSE }
      return $TRUE
   } 
else
   { return $FALSE }